package Demo2;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static List<Character> func1(String s1,String s2){
        //遍历s1看其中是否存在s2中的元素
        List<Character> list = new ArrayList<>();
        for (int i = 0; i < s1.length(); i++) {
            char ch = s1.charAt(i);
            if(!s2.contains(ch + "")){
                list.add(ch);
            }
        }
        return list;
    }
    public static void main(String[] args) {
    String str1 = "welcome to cvte";
    String str2 = "come";
    List<Character> ret = func1(str1,str2);
    for (char ch: ret){
        System.out.print(ch);
    }
    }
}
